<template>
  <div class="login">
    <el-form ref = "AccountForm" :model = "account" :rules = "rules" label-position = "left" label-width = "50px" class = "demo-ruleForm login-container">
      <div class = "formGroup">
        <el-form-item  label = "账号" prop = "username" >
          <el-input type = "text" v-model="account.username" auto-complete = "off" placeholder = "请输入您的账号" class = "form-control" ></el-input>
        </el-form-item>
        <el-form-item label = "密码" prop = "password" class = "form-inline">
          <el-input type = "password"  v-model="account.password" auto-complete = "off" placeholder = "请输入密码" class = "form-control" ></el-input>
        </el-form-item>
      </div>
      <div class = "remFor">
        <el-checkbox v-model = "checked" class = "remember" >记住密码</el-checkbox>
        <router-link to = "/forgetPass" class = "forgetpwd" >忘记密码？</router-link>
        <router-view></router-view>
      </div>
      <div class = "formButton">
        <el-form-item style = "width:100%;">
          <button style = "width:100%; height: 35px; background: #3A825E; font-size:14px; font-family:PingFang SC; color:#fff; border-radius:2px " @click =  "login" >登录</button>
        </el-form-item>
      </div>
    </el-form>
  </div>
</template>

<script>
export default {
  name: 'Login',
  data () {
    return {
      logining: false,
      account: {
        username: '',
        password: ''
      },
      checked: 'false',
      rules: {
        username: [
          {required: true, message: '请输入账号', trigger: 'blur'}
        ],
        password: [
          {required: true, message: '请输入密码', trigger: 'blur'}
        ]
      }
    }
  },
  methods: {
    login () {
    }
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
  .login-container {

    -webkit-border-radius: 5px;
    border-radius: 15px;
    -moz-border-radius: 5px;
    background-clip: padding-box;
    margin: 180px auto;
    width: 350px;
    padding: 45px 45px 15px 45px;
    background: rgba(255,255,255,0.7)

  ;
    border: 1px solid #eaeaea;
    box-shadow: 0 0 25px #cac6c6;

  }
  label{
    width:70px;
    text-align:left;
  }

  .form-control{
    width:270px;
    flex: 1;
    -webkit-flex: 1;
    -ms-flex: 1;

  }
  .remember{
    width:250px;
    text-align:left;
  }
  .forgetpwd{
    width:500px;
    text-align:right;
    font-size:14px;
    font-family:PingFang SC;
  }
  .remFor{
    margin-bottom: 10px;
    padding-bottom: 10px;
  }
</style>
